import re, os
from website.website_base import WebSiteBase, FetchQueueItem, WebSiteDb
from bs4 import BeautifulSoup
from lib.log import DBG, INFO, ERROR, EXCEPTION
from lib.sqlite_ext import DBApiExt
from website.homeweb.homeweb import Homeweb


class Wwfs(Homeweb):
    """
    """
    # "https://www.wwfs7.shop/cn/home/web/ 万物复苏",
    INDEX_URL = "https://www.wwfs7.shop"
    cmdpath = os.path.abspath(os.getcwd())
    DB = os.path.join(cmdpath, "website", "wwfs", "wwfs.db")
    SAVE_DIR = os.path.join(cmdpath, "website", "wwfs", "page")

    def __init__(self):
        super().__init__()

    @classmethod
    def _class_config(cls):
        """
        获取所有分类首页url列表

        :return:
        """

        class_list = [
            {"name": "人妻熟女", "id": 1},
            {"name": "强奸乱伦", "id": 2},
            {"name": "制服师生", "id": 3},
            {"name": "网红主播", "id": 4},
            {"name": "偷拍自拍", "id": 20},
            {"name": "自慰自淫", "id": 21},
            {"name": "国产专区", "id": 22},
            {"name": "虐待同性", "id": 23},
            {"name": "日韩精品", "id": 24},
            {"name": "欧美性爱", "id": 25},
            {"name": "卡通动漫", "id": 26},
            {"name": "三级伦理", "id": 27}

        ]

        return class_list

    def _parse_class_page_a_list_content(self, soup):
        lis = soup.select(".item")
        return lis

